-- GENERATED SPELL FOR [Sunblade Imp] --


function spell0_24815(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(44577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24815', 2000, 1)
end

function spell1_24815(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(46044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24815', 1500, 1)
end

function Sorts_24815(pUnit, Event)
local choix_sorts_24815 = math.random(0, 1)
if choix_sorts_24815 == 0 then
pUnit:RegisterEvent('spell0_24815', 1, 1)
end
if choix_sorts_24815 == 1 then
pUnit:RegisterEvent('spell1_24815', 1, 1)
end
end

function mob24815_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24815', math.random(1500, 3000), 1)
end

function mob24815_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24815_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24815_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24815, 1, 'mob24815_Action')
RegisterUnitEvent(24815, 2, 'mob24815_Leave')
RegisterUnitEvent(24815, 3, 'mob24815_Kill')
RegisterUnitEvent(24815, 4, 'mob24815_Die')
